package itsm.isperp.module.entity.app;

import itsm.isperp.framework.domain.BaseBean;
import itsm.isperp.framework.sequence.SequenceRule;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 系统流水号实体
 * 
 * @author lizx
 * @date 2013-3-5
 * @version V1.0
 */
@Entity
@Table(name = "app_sequence")
public class AppSequence extends BaseBean implements SequenceRule {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Column(name = "name")
	private String name;

	@Column(name = "table_name")
	private String tableName;

	@Column(name = "column_name")
	private String columnName;

	@Column(name = "seq_rule")
	private String seqRule;

	@Column(name = "seq_rule")
	private String seqRuleDesc;

	@Column(name = "auto_recovery")
	private boolean autoRecovery;

	@Column(name = "seq_type")
	private Integer seqType = new Integer(0);

	@Column(name = "seq_number")
	private long seqNumber = 0L;

	@Column(name = "seq_reset_type")
	private Integer seqResetType;

	@Column(name = "last_seq_date")
	private Date lastSeqDate;

	@Column(name = "order_num")
	private Integer orderNum;

	public String getName() {
		return name;
	}

	public String getTableName() {
		return tableName;
	}

	public String getColumnName() {
		return columnName;
	}

	public String getSeqRule() {
		return seqRule;
	}

	public Boolean getAutoRecovery() {
		return autoRecovery;
	}

	public Integer getSeqType() {
		return seqType;
	}

	public long getSeqNumber() {
		return seqNumber;
	}

	public Integer getOrderNum() {
		return orderNum;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}

	public void setSeqRule(String seqRule) {
		this.seqRule = seqRule;
	}

	public void setAutoRecovery(boolean autoTecovery) {
		this.autoRecovery = autoTecovery;
	}

	public void setSeqType(Integer seqType) {
		this.seqType = seqType;
	}

	public void setSeqNumber(long seqNumber) {
		this.seqNumber = seqNumber;
	}

	public Integer getSeqResetType() {
		return seqResetType;
	}

	public void setSeqResetType(Integer seqResetType) {
		this.seqResetType = seqResetType;
	}

	public void setOrderNum(Integer orderNum) {
		this.orderNum = orderNum;
	}

	public Date getLastSeqDate() {
		return lastSeqDate;
	}

	public void setLastSeqDate(Date lastSeqDate) {
		this.lastSeqDate = lastSeqDate;
	}

	public String getSeqRuleDesc() {
		return seqRuleDesc;
	}

	public void setSeqRuleDesc(String seqRuleDesc) {
		this.seqRuleDesc = seqRuleDesc;
	}

}
